package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.domain.Gift;
import cn.wolfcode.crm.qo.GiftBillQueryObject;
import cn.wolfcode.crm.qo.GiftQueryObject;
import cn.wolfcode.crm.qo.PageResult;
import cn.wolfcode.crm.service.IGiftBillService;
import cn.wolfcode.crm.service.IGiftService;
import cn.wolfcode.crm.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("giftbill")
public class GiftBillController {
    @Autowired
    private IGiftBillService giftBillService;

    //用来显示页面的
    @RequestMapping("list")
    public String list(){
        return "giftbill/list";
    }

    //后台查询显示的数据
    @ResponseBody
    @RequestMapping("queryByMemberId")
    public PageResult queryByMemberId(GiftBillQueryObject qo){
        PageResult pageResult = giftBillService.queryByMemberId(qo);
        return pageResult;
    }

    //后台查询显示的数据
    @ResponseBody
    @RequestMapping("query")
    public PageResult query(GiftBillQueryObject qo){
        PageResult pageResult = giftBillService.query(qo);
        return pageResult;
    }

}
